package com.msw.jcwapi.wb.wbjyz.service.impl;

import com.msw.jcwapi.wb.wbdz.entity.Wbdz;
import com.msw.jcwapi.wb.wbjyz.entity.Wbjyz;
import com.msw.jcwapi.wb.wbjyz.mapper.WbjyzMapper;
import com.msw.jcwapi.wb.wbjyz.service.IWbjyzService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author author
 * @since 2025-04-01
 */
@Service
public class WbjyzServiceImpl extends ServiceImpl<WbjyzMapper, Wbjyz> implements IWbjyzService {

    @Autowired
    private WbjyzMapper wbjyzMapper;

    //通过工程id查询全部底座
    @Override
    public List<Wbjyz> listByProId(int id) {
        return wbjyzMapper.listByProId(id);
    }

    //通过wbjyzid删除该绝缘子
    @Override
    public boolean deleteById(int id) {
        return wbjyzMapper.deleteById(id);
    }

    //编辑腕臂绝缘子(通过id编辑)
    @Override
    public boolean update(Wbjyz wbjyz) {
        return wbjyzMapper.Edit(wbjyz);
    }

    //通过wbjyzid查询该绝缘子的全部信息
    @Override
    public Wbjyz listByWbjyzId(int id) {
        return wbjyzMapper.listByWbjyzId(id);
    }

    //添加腕臂绝缘子
    @Override
    public boolean add(Wbjyz wbjyz) {
        return wbjyzMapper.add(wbjyz);
    }

}
